import { EntityDto } from './entity';
import type { IAudited } from './interfaces/audited';
import type { MenuResultDto } from './menu';
import { PagedResultRequestDto } from './paged-result-request';
import type { RolePermissionDto } from './role-permissions';

export class RoleDto extends EntityDto {
    public code!: string;

    public displayName!: string;

    public description?: string;
}

export class RoleResultDto extends RoleDto implements IAudited {
    public creatorUserId?: number;

    public creationTime!: Date;

    public lastModifierUserId?: number;

    public lastModificationTime?: Date;
}

export class RoleResultRequestDto extends PagedResultRequestDto {
    public code?: string;

    public displayName?: string;
}

export class MenuRoleOutputDto {
    public rolePermissionDtos!: Array<RolePermissionDto>;

    public menuResultDtos!: Array<MenuResultDto>;
}